﻿<UserControl x:Class="UsingBxf.EditCustomer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" xmlns:my="clr-namespace:UsingBxf.ViewModels" Loaded="UserControl_Loaded" xmlns:bxf="http://schemas.lhotka.net/1.0.0/bxf">
  <UserControl.Resources>
    <CollectionViewSource x:Key="customerViewModelViewSource" d:DesignSource="{d:DesignInstance my:CustomerViewModel, CreateList=True}" />
  </UserControl.Resources>
  <Grid>
    <Grid DataContext="{StaticResource customerViewModelViewSource}" Name="grid1">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto" />
        <ColumnDefinition Width="Auto" />
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="Auto" />
        <RowDefinition Height="38*" />
        <RowDefinition Height="198*" />
      </Grid.RowDefinitions>
      <Label Content="Id:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
      <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="idTextBox" Text="{Binding Path=Id, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
      <Label Content="Name:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
      <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="3" Name="nameTextBox" Text="{Binding Path=Name, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
      <StackPanel Grid.ColumnSpan="2" Grid.Row="2" Name="stackPanel1" Orientation="Horizontal" DataContext="{Binding Path=/}">
        <Button Content="Error" Height="23" Name="ErrorButton" Width="75" Margin="3" />
        <Button Content="Status" Height="23" Name="StatusButton" Width="75" Margin="3" />
        <bxf:TriggerAction Height="0" Name="ErrorTrigger" Width="0" TargetControl="{Binding ElementName=ErrorButton}" MethodName="ShowAnError" />
        <bxf:TriggerAction Height="0" Name="StatusTrigger" Width="0" TargetControl="{Binding ElementName=StatusButton}" MethodName="ShowSomeStatus" DataContext="{Binding}" />
      </StackPanel>
    </Grid>
  </Grid>
</UserControl>
